import cv2
import numpy
import math
sigma = 3.

theta = 0.

lambd = math.pi/2
gamma = 1.
psi = math.pi/2

image = numpy.zeros((100,100,3), numpy.uint8)
for i in range(1,15):
        dim = (i,i)
        kernel = cv2.getGaborKernel(ksize=dim, sigma=sigma, theta=theta, lambd=lambd, gamma=gamma, psi=psi)
        onekernel = numpy.ones((100,100,1), numpy.uint8)
        print("size : %s" % (dim,))
        print("ones")
        cv2.filter2D(src=image, ddepth = -1, kernel=onekernel)
        print("gabor")
        cv2.filter2D(src=image, ddepth = -1, kernel=kernel)
        print("Success.")
